home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11066 < prev    next >
Encoding:
Text File  |  2002-07-05  |  8.5 KB  |  356 lines

  1.  <html>
  2.  
  3. <head>
  4. <LINK REL="stylesheet" TYPE="text/css" HREF="%1css/default.css">
  5.  
  6.  
  7. <script language="Javascript">
  8. //LOCALIZATION STRINGS
  9. var _strConfirmContinue = "If you continue, the changes you have made will not be applied.  Do you wish to continue?";
  10.  
  11. </script>
  12.  
  13. <SCRIPT LANGUAGE="JavaScript">
  14.  
  15. // use for put in an empty option into the select, otherwise, deleted stuff will still be shown
  16. var emptyString = "                    ";
  17.  
  18. function OnCancelAndExit()
  19. {
  20.     window.parent.location = "%15";
  21. }
  22.  
  23. function init()
  24. {
  25.    // Remove the formatting options 
  26.     document.AddRemoveRights.targets.options[0] = null;
  27.     document.AddRemoveRights.choices.options[0] = null;
  28.     
  29.     document.AddRemoveRights.uorgselect.selectedIndex = %2;
  30. }
  31.  
  32.  
  33. function onFilter()
  34. {
  35.     if (document.AddRemoveRights.targets.options.length > 0)
  36.     {
  37.         if (!confirm(_strConfirmContinue))
  38.             return; 
  39.     }
  40.  
  41.     var url = "%13";
  42.     url += "&filter=" + escape(document.AddRemoveRights.filter.value);
  43.     window.location = url; 
  44. }
  45.  
  46. function onNext()
  47. {
  48.     if (document.AddRemoveRights.targets.options.length > 0)
  49.     {
  50.         if (!confirm(_strConfirmContinue))
  51.             return;
  52.     }
  53.  
  54.     window.location = "%16"; 
  55. }
  56.  
  57. function onPrevious()
  58. {
  59.     if (document.AddRemoveRights.targets.options.length > 0)
  60.     {
  61.         if (!confirm(_strConfirmContinue))
  62.             return;
  63.     }
  64.     window.location = "%17"; 
  65. }
  66.  
  67. function changeCategory()
  68. {
  69.     // Add Remove Groups
  70.    if (document.AddRemoveRights.uorgselect.selectedIndex == 0)
  71.    { 
  72.         window.location = "%3";
  73.    }
  74.    // Add Users
  75.    if (document.AddRemoveRights.uorgselect.selectedIndex == 1)
  76.    { 
  77.           window.location = "%4";
  78.    }
  79.    // Remove Users
  80.    else if (document.AddRemoveRights.uorgselect.selectedIndex == 2)
  81.    {
  82.           window.location = "%5"; 
  83.    }
  84. }
  85.  
  86. function add(src,dest,flag)
  87. {
  88. //flag is going to be true or false
  89. //if flag is true, it is adding, otherwise, it is removing.
  90. //we need this, because, when adding, newHasExplicitRight is going to be true
  91. //when removing, newHasExplicitRight is going to be false
  92.  
  93.     var count = src.options.length;
  94.  
  95.     // anything to add?
  96.     if ( count == 0)
  97.         return;
  98.  
  99.     var selArr = new Array;
  100.  
  101.     var i = 0
  102.     if (src.options[0].text == emptyString)
  103.         i = 1;  
  104.  
  105.     for (i; i < count; i++)
  106.     {
  107.          if (src.options[i].selected) selArr[selArr.length] = i;
  108.     }
  109.  
  110.     if ( selArr.length == count ) {
  111.         addAll(src,dest, flag);
  112.         return;
  113.     } 
  114.  
  115.     for (var i = 0; i < selArr.length; i++)
  116.     {
  117.         index = selArr[i];
  118.     
  119.         current_target = src[index];
  120.         
  121.         option = new Option(current_target.text, current_target.value, false, false); 
  122.  
  123.         // If we are adding to an empty list
  124.         if (dest.options.length == 1)
  125.         { 
  126.             if (dest.options[0].text == emptyString)
  127.             {
  128.                 dest.options[0] = option; 
  129.             }
  130.             else dest.options[dest.options.length] = option;
  131.         }
  132.         else dest.options[dest.options.length] = option;
  133.      }
  134.  
  135.     for (var i = 0; i < selArr.length; i++)
  136.     {
  137.         src[selArr[i]-i] = null;
  138.     }
  139.  
  140.     if (src.length == 0)
  141.     {
  142.         // if this is the last one, set emptystring
  143.         src[0] = new Option(emptyString, 0, false, false);
  144.     } 
  145. }
  146.  
  147. function addAll(src,dest,flag)
  148. {
  149. //flag is going to be true or false
  150. //if flag is true, it is adding, otherwise, it is removing.
  151. //we need this, because, when adding, newHasExplicitRight is going to be true
  152. //when removing, newHasExplicitRight is going to be false
  153.  
  154.     var count = src.options.length;
  155.  
  156.     // anything to add?
  157.     if ( count == 0)
  158.         return;
  159.  
  160.     var i = 0
  161.     if (src.options[0].text == emptyString)
  162.         i = 1;  
  163.  
  164.     for (i; i < count; i++)
  165.     {
  166.         current_target = src[i];
  167.                  
  168.         option = new Option(current_target.text, current_target.value, false, false); 
  169.  
  170.         if (dest.options.length == 1)
  171.         {
  172.             if (dest.options[0].text == emptyString)
  173.                 dest.options[0] = option; 
  174.  
  175.             else dest.options[dest.options.length] = option;
  176.         }
  177.         else dest.options[dest.options.length] = option;
  178.     }
  179.  
  180.     src.options.length = 0;
  181.     src[0] = new Option(emptyString, 0, false, false);
  182. }
  183.  
  184. function OnSubmit()
  185. {
  186.    added_final_value = ""; 
  187.    added_first = true;
  188.  
  189.     // Just run though all the targets and assign the values
  190.     for (count = 0; count < document.AddRemoveRights.targets.options.length; ++count)
  191.     {
  192.         
  193.         temp = document.AddRemoveRights.targets.options[count];
  194.     
  195.         if (temp.value == 0)
  196.             continue;  
  197.  
  198.         // add right
  199.         if (!added_first)
  200.             added_final_value += "+"; 
  201.         else 
  202.             added_first = false; 
  203.  
  204.         added_final_value += temp.value;
  205.     }
  206.                 
  207.     // Build the string
  208.     document.AddRemoveRights.Added.value = added_final_value;
  209.     
  210.     document.AddRemoveRights.submit();
  211.    
  212. </SCRIPT>
  213. </head>
  214.  
  215. <BODY onload="init();">
  216.  
  217.  
  218. <FORM action="%6" target="_parent" method="post" name="AddRemoveRights" >
  219.  
  220. <BR>
  221.  
  222.  
  223. <table CELLPADDING="2" CELLSPACING="2" border=0>  
  224. <tr>
  225.     <td class="list" width=10>
  226.     <td class="list">
  227.  
  228.         Select Operation: 
  229.         <SELECT NAME="uorgselect" width=200 onChange="changeCategory()">
  230.         <OPTION VALUE="groups"> Add/Remove Groups </OPTION>
  231.         <OPTION VALUE="add_users"> Add Users  </OPTION>
  232.         <OPTION VALUE="rem_users"> Remove Users  </OPTION>
  233.         </SELECT>
  234.     <td>
  235.     <td class="list" width=20>
  236.     <td class="list"> <strong> %7 </strong> 
  237. </tr>
  238. </table>
  239.     
  240. <BR>
  241.     
  242. <table CELLPADDING="2" CELLSPACING="2" border=0>
  243.   <tr>
  244.     <td class="list" width=10> </td>
  245.     <td class="list" align> Look For: <input type="text" name="filter" value="%12" size=15> </td> 
  246.     <td align="left" colspan=2>
  247.     <table>
  248.       <tr>
  249.       <td><table cellpadding=0><tr>
  250.         <td class="clsButton" align=middle nowrap>
  251.            <div class="clsButton"> <A HREF="javascript:onFilter();">Find Now</A> </div>
  252.         </td></tr></table>
  253.       </td>
  254.       </tr>
  255.     </table>
  256.     </td>
  257.   </tr>
  258. <table>
  259.  
  260. <center>
  261. <table CELLPADDING="2" CELLSPACING="2" border=0 width=100%>
  262.   <tr> 
  263.     <td class="list" width=10> </td>
  264.     <td class="list" align=left colspan=2> 
  265.         %8
  266.     </td>
  267.     <td class="list">
  268.         %9
  269.     </td>
  270.   </tr>
  271.  
  272.   <tr>
  273.     <td class="list" width=10> </td>
  274.     <td class="list">
  275.         <SELECT class="menuFormElement" multiple NAME="choices" SIZE=10 width=250>
  276.             <OPTION> This is a formatting string </OPTION>
  277.             %10
  278.         </SELECT>
  279.     </td>
  280.     
  281.     <td>
  282.         <table border=0 cellpadding=0> 
  283.             <tr><td align=middle>
  284.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  285.                 <tr><td class="clsButton" align=middle nowrap> 
  286.                     <div class="clsButton"><a href="javascript:add(document.AddRemoveRights.choices, document.AddRemoveRights.targets, true)">     >    </a></div>
  287.                 </td></tr>
  288.                 </table>
  289.             </td></tr>
  290.     
  291.             <tr><td align=middle>
  292.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  293.                 <tr><td class="clsButton" align=middle nowrap> 
  294.                     <div class="clsButton"><a href="javascript:addAll(document.AddRemoveRights.choices, document.AddRemoveRights.targets, true)">    >>   </a></div>
  295.                 </td></tr>
  296.                 </table>
  297.             </td></tr>
  298.   
  299.             <tr><td>
  300.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  301.                 <tr><td class="clsButton" align=middle nowrap>     
  302.                     <div class="clsButton"><a href="javascript:add(document.AddRemoveRights.targets, document.AddRemoveRights.choices, false)">    <    </a></div>
  303.                 </td></tr>
  304.                 </table>
  305.             </td></tr>
  306.             <tr><td align=middle>
  307.                 <table align=center CELLPADDING="0" CELLSPACING="5" border=0> 
  308.                 <tr><td class="clsButton" align=middle nowrap>     
  309.                     <div class="clsButton"><a href="javascript:addAll(document.AddRemoveRights.targets, document.AddRemoveRights.choices, false)">   <<   </a></div>
  310.                 </td></tr>
  311.                 </table>
  312.             </td></tr>
  313.         </table>
  314.     </td>
  315.     
  316.     <td class="list">
  317.         <SELECT class="menuFormElement" multiple NAME="targets" SIZE=10 width=250>
  318.             <OPTION> This is a formatting string </OPTION>
  319.             %11
  320.         </SELECT>
  321.     </td>
  322.  </tr>
  323.  
  324.  <tr>
  325.     <td class="list" width=10> </td>
  326.     <td class="list" colspan=3 align="left">
  327.     %14
  328.     </td>
  329.  </tr>
  330.  
  331. </table>
  332.  
  333. <BR>
  334.  
  335. <table align=center cellpadding=0 border=0>
  336. <tr>
  337.     <td class="clsButton" align=middle nowrap> 
  338.         <div class="clsButton"><a href="javascript:OnSubmit()">OK</a></div>
  339.     </td>
  340.  
  341.     <td class="clsButton" align=middle nowrap> 
  342.         <div class="clsButton"><a href="javascript:OnCancelAndExit()">Cancel</a></div>
  343.     </td>
  344. </tr>
  345. </table>
  346.  
  347. </center>
  348.  
  349. <input type=hidden name="Added" value = "">
  350.  
  351. </FORM>
  352.  
  353. </body>
  354. </html>
  355.